﻿////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// <copyright>Copyright 2008-2011 Andreas Huber Doenni</copyright>
// Distributed under the GNU General Public License version 2 (GPLv2).
// See accompanying file License.txt or copy at http://phuse.codeplex.com/license.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

namespace Phuse.Net.Forums
{
    /// <summary>Implements the common functionality of subclasses that report group receive progress.</summary>
    /// <typeparam name="TMostDerived">The most-derived subclass of this type.</typeparam>
    /// <threadsafety static="true" instance="false"/>
    public abstract class GroupReceiveProgress<TMostDerived> : SendReceiveProgress<TMostDerived>
        where TMostDerived : GroupReceiveProgress<TMostDerived>
    {
        private readonly string displayName;

        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        /// <summary>Gets the display name of the group involved in the receive operation.</summary>
        public string DisplayName
        {
            get { return this.displayName; }
        }

        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        internal GroupReceiveProgress(int percent, string displayName) : base(percent)
        {
            this.displayName = displayName;
        }
    }
}
